package com.pianzhu.blockchainemr.mapper;

import com.pianzhu.blockchainemr.pojo.*;
import com.pianzhu.blockchainemr.pojo.Param.EmpowerParam;
import com.pianzhu.blockchainemr.pojo.result.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Date;

@Mapper
public interface PatientMapper {

    List<EmrHospital> getHospitalList();

    List<EmrDeptDict> getDeptList();

    List<EmrUser> getDoctorList(String deptId, Integer hospitalId);

    void appointment(EmrMedVisit visit);

    int countTodayRecordsByDateRange(@Param("startDate") Date startDate, @Param("endDate") Date endDate);

    String selectPatientIdByUserId(Integer userId);

    String selectPatientIdByUsername(String username);

    List<MedicalRecordListResult> getMedicalRecordList(String patientId);


    MedicalRecordInfo getMedicalRecordInfo(String docId);

    String selectRealNameById(Integer patientId);

    String selectRealNameByPatientId(String patientId);

    String selectDeptNameByDeptCode(String deptCode);

    List<MedicalReportListResult> getReportList(String patientId);

    MedicalReportInfo getMedicalReportInfo(String reportId);

    List<EmpowerResult> getEmpowerList(String patientId);

    String selectHospitalNameByDoctorId(Integer doctorId);

    void updateEmpowerStatus(EmpowerParam empowerParam);

    List<EmpowerResult> getReportEmpowerList(String patientId);

    void updateCheckupStatus(EmpowerParam empowerParam);

    void deleteCheckup(EmpowerParam param);

    void deleteEmpowerStatus(EmpowerParam empowerParam);

    List<EmrMedOrders> getMyPrescription(String id);
}
